package com.lancoo.ccas52.controller;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lancoo.ccas52.aspect.LogAnnotation;
import com.lancoo.ccas52.entity.*;
import com.lancoo.ccas52.pojo.common.PageInfo;
import com.lancoo.ccas52.pojo.vo.*;
import com.lancoo.ccas52.service.CssTaskInfoService;
import com.lancoo.ccas52.service.StudentService;
import com.lancoo.ccas52.service.TeachingClassService;
import com.lancoo.ccas52.util.ResponseObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName PreSelectController
 * @Description TODO
 * @Author quin
 * @Date 2023/1/11 15:51
 */
@Api(tags = "选课")
@RestController
@RequestMapping("/api/v5.2.1/pc/preSelectCourse")
public class PreSelectController {

    @Resource
    private CssTaskInfoService cssTaskInfoService;
    @Resource
    private TeachingClassService teachingClassService;
    @Resource
    private StudentService studentService;


    @ApiOperation("获取设置预选课的课程列表")
    @GetMapping("/getClassList")
    public ResponseObject<PageInfo<CoursePlanDto>> getCourseByPreSelect(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                                        @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                                                        @ApiParam(value = "课程类别id 传null全部", required = false) @RequestParam(required = false) String courseTypeId,
                                                                        @ApiParam(value = "课程性质 0全部 1必修  2选修", required = false) @RequestParam(required = false) Integer courseNature,
                                                                        @ApiParam(value = "专业性质，1:公共课，2:专业课", required = false) @RequestParam(required = false) Integer majorProp,
                                                                        @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                                        @ApiParam(value = "课程名模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                                        @ApiParam(value = "1待设置 2已设置", required = false) @RequestParam(required = false) Integer state,
                                                                        @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                                        @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<CoursePlanDto> page = new Page<>(currentPage, pageSize);
        page.setOptimizeCountSql(false);
        return ResponseObject.ofSuccess(cssTaskInfoService.getCourseAndPreByConditions(taskId, page, studyNature, courseTypeId, courseNature, majorProp, collegeId, keyWord, state));
    }

    @ApiOperation("统计预选课程设置情况")
    @GetMapping(value = "getPreCourseSet")
    public ResponseObject<PreCourseConfiguredVo> getPreCourseSet(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getPreCourseSet(taskId));
    }

    @ApiOperation("批量设置预选课课程")
    @PutMapping("/setSelectCourse")
    @LogAnnotation(operationType = "1", operationContent = "批量设置预选课课程")
    public ResponseObject<Boolean> addPreSelectCourse(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                      @ApiParam(value = "1：设置为课程，2：取消设置", required = true) @RequestParam Integer preState,
                                                      @ApiParam(value = "待处理课程", required = true) @RequestBody List<PreCourseInput> preCourseList) {
        return ResponseObject.ofSuccess(cssTaskInfoService.addPreSelectCourse(taskId, preState, preCourseList));
    }

    @ApiOperation("获取预选课程列表-<获取设置教学班课程列表>")
    @GetMapping("/getSetClassCourseList")
    public ResponseObject<PageInfo<CoursePlanDto>> getPreSelectTeachingClass(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                                             @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                                                             @ApiParam(value = "课程类别id 传null全部", required = false) @RequestParam(required = false) String courseTypeId,
                                                                             @ApiParam(value = "课程性质 0全部 1必修  2选修", required = false) @RequestParam(required = false) Integer courseNature,
                                                                             @ApiParam(value = "专业性质，1:公共课，2:专业课", required = false) @RequestParam(required = false) Integer majorProp,
                                                                             @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                                             @ApiParam(value = "课程名模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                                             @ApiParam(value = "1待设置 2已设置", required = false) @RequestParam(required = false) Integer state,
                                                                             @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                                             @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<CoursePlanDto> page = new Page<>(currentPage, pageSize);
        page.setOptimizeCountSql(false);
        return ResponseObject.ofSuccess(cssTaskInfoService.getPreByConditions(taskId, page, studyNature, courseTypeId, courseNature, majorProp, collegeId, keyWord, state));
    }

    @ApiOperation("设置预选课课程状态")
    @PutMapping("/setSelectState")
    @LogAnnotation(operationType = "2", operationContent = "设置预选课课程状态")
    public ResponseObject<Boolean> setSelectState(@ApiParam(value = "预选id", required = true) @RequestParam Integer preSelectId,
                                                  @ApiParam(value = "操作状态 1未设置 2已设置", required = true) @RequestParam Integer state) {
        return ResponseObject.ofSuccess(cssTaskInfoService.setSelectState(preSelectId, state));
    }

    @ApiOperation("统计-发布选课结果")
    @GetMapping(value = "/preStatistics")
    public ResponseObject<PublishStatisticsPre> preStatistics(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                              @ApiParam(value = " 1在线选课; 3:预选", required = true) @RequestParam Integer teachingClassType,
                                                              @ApiParam(value = "最低开班人数", required = false) @RequestParam(required = false, defaultValue = "30") Integer minClassNum) {
        return ResponseObject.ofSuccess(teachingClassService.preStatistics(taskId, teachingClassType, minClassNum));
    }

    @ApiOperation("发布选课结果(教学班状态？)")
    @PutMapping(value = "/release")
    @Deprecated
    public ResponseObject<Boolean> publishPlan(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId) {
        return ResponseObject.ofSuccess();
    }


    @ApiOperation("获取选课轮次/选课任务")
    @GetMapping(value = "/cs/getCssTask")
    public ResponseObject<CssTaskInfo> getCssTask(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                  @ApiParam(value = "1预选 2正式选课", required = true) @RequestParam Integer type) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getCssTaskInfo(taskId, type));
    }

    @ApiOperation("设置选课轮次/选课任务")
    @PostMapping(value = "/cs/setCssTask")
    @LogAnnotation(operationType = "2", operationContent = "设置选课轮次/选课任务")
    public ResponseObject<CssTaskInfo> setCssTask(@ApiParam(value = "选课任务实体类", required = true) @RequestBody CssTaskInfoInput cssTaskInfoInput) {
        CssTaskInfo cssTaskInfo = new CssTaskInfo();
        BeanUtil.copyProperties(cssTaskInfoInput, cssTaskInfo);
        return ResponseObject.ofSuccess(cssTaskInfoService.updateCssTaskInfo(cssTaskInfo));
    }

    @ApiOperation("是否可以修改轮次")
    @GetMapping(value = "/cs/getEarliestRound")
    public ResponseObject<Boolean> getEarliestRound(@ApiParam(value = "选课 id", required = true) @RequestParam Integer cssTaskId) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getEarliestRound(cssTaskId));
    }

    @ApiOperation("批量删除轮次")
    @DeleteMapping(value = "/cs/removeUselessRound")
    public ResponseObject<Boolean> removeUselessRound(@ApiParam(value = "选课 id", required = true) @RequestParam Integer cssTaskId,
                                                      @ApiParam(value = "轮次 1正 2补 3退", required = true) @RequestBody List<Integer> selectRound) {
        return ResponseObject.ofSuccess(cssTaskInfoService.removeUselessRound(cssTaskId,selectRound));
    }


    @ApiOperation("更新或添加选课轮次")
    @PostMapping(value = "/cs/addOrUpdateCssTaskRound")
    public ResponseObject<CssTaskRound> addOrUpdateCssTaskRound(@ApiParam(value = "选课轮次实体类", required = true) @RequestBody CssTaskRound cssTaskRound) {
        return ResponseObject.ofSuccess(cssTaskInfoService.addOrUpdateCssTaskRound(cssTaskRound));
    }

    @ApiOperation("根据选课 id和轮次获取所有选课轮次")
    @GetMapping(value = "/cs/getCssTaskRound")
    public ResponseObject<List<CssTaskRound>> getCssTaskRound(@ApiParam(value = "选课 id", required = true) @RequestParam Integer cssTaskId,
                                                              @ApiParam(value = "轮次 1正 2补 3退", required = true) @RequestParam Integer selectRound) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getCssTaskRound(cssTaskId, selectRound));
    }

    @ApiOperation("删除选课轮次")
    @DeleteMapping(value = "/cs/removeCssTaskRound")
    public ResponseObject<Boolean> removeCssTaskRound(@ApiParam(value = "轮次阶段id", required = true) @RequestParam Integer roundId) {
        return ResponseObject.ofSuccess(cssTaskInfoService.removeCssTaskRound(roundId));
    }

    @ApiOperation("设置选课范围")
    @PostMapping(value = "/cs/setRange")
    public ResponseObject<List<CssRange>> setRange(@ApiParam(value = "选课范围实体类", required = true) @RequestBody List<CssRange> cssRanges,
                                                   @ApiParam(value = "1院系 2年级 3课程类别 null院系+年级 ", required = false) @RequestParam(required = false) Integer optionIdentify,
                                                   @ApiParam(value = "轮次阶段id", required = true) @RequestParam Integer roundId) {
        return ResponseObject.ofSuccess(cssTaskInfoService.setRange(cssRanges, optionIdentify, roundId));
    }

    @ApiOperation("获取选课范围")
    @PostMapping(value = "/cs/getRange")
    public ResponseObject<List<CssRange>> getRange(@ApiParam(value = "1院系 2年级 3课程类别 null全部", required = false) @RequestParam(required = false) Integer optionIdentify,
                                                   @ApiParam(value = "轮次阶段id", required = true) @RequestBody List<Integer> roundIds) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getRange(roundIds, optionIdentify));
    }

    @ApiOperation("获取禁选学生列表")
    @GetMapping(value = "/cs/prohibit/getStudentList")
    public ResponseObject<PageInfo<StudentProhibitVo>> getProhibitStudent(@ApiParam(value = "选课计划id", required = false) @RequestParam(required = true) Integer cssTaskId,
                                                                          @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                                          @ApiParam(value = "年级id ", required = false) @RequestParam(required = false) String gradeId,
                                                                          @ApiParam(value = "名称、学号模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                                          @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                                          @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<StudentProhibitVo> page = new Page<>(currentPage, pageSize);
        page.setOptimizeCountSql(false);
        return ResponseObject.ofSuccess(studentService.getProhibitStudent(cssTaskId, page, collegeId, gradeId, keyWord));
    }

    @ApiOperation("新增禁选学生")
    @PostMapping(value = "/cs/prohibit/addStudent")
    @LogAnnotation(operationType = "1", operationContent = "新增禁选学生")
    public ResponseObject<Integer> addProhibitStudent(@ApiParam(value = "选课任务实体类", required = true) @RequestBody List<CssProhibitStudentInput> prohibitList) {
        return ResponseObject.ofSuccess(cssTaskInfoService.addProhibitStudent(prohibitList));
    }

    @ApiOperation("批量删除禁选学生")
    @DeleteMapping(value = "/cs/prohibit/removeStudent")
    @LogAnnotation(operationType = "4", operationContent = "批量删除禁选学生")
    public ResponseObject<Integer> removeProhibitStudent(@ApiParam(value = "学生id", required = true) @RequestBody List<Long> prohibitIds) {
        return ResponseObject.ofSuccess(cssTaskInfoService.removeProhibitStudent(prohibitIds));
    }

    @ApiOperation("批量设置学生跨专业")
    @PostMapping(value = "/cs/updateStudentCross")
    @LogAnnotation(operationType = "2", operationContent = "批量设置学生跨专业")
    public ResponseObject<Boolean> updateStudentCross(@ApiParam(value = "更新学生实体类", required = true) @RequestBody List<Long> studentIds,
                                                      @ApiParam(value = "选课范围 1本专业年级  2本专业跨年级 3本院系跨年级 4全部专业年级", required = true) @RequestParam Integer selectionScope) {
        return ResponseObject.ofSuccess(studentService.updateStudent(studentIds, selectionScope));
    }

    @ApiOperation("获取专业选课上限列表")
    @GetMapping("/cs/limit/getMajor")
    public ResponseObject<PageInfo<Major>> getMajorLimit(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                         @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                         @ApiParam(value = "专业id ", required = false) @RequestParam(required = false) String majorId,
                                                         @ApiParam(value = "年级id ", required = false) @RequestParam(required = false) String gradeId,
                                                         @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                                         @ApiParam(value = "专业、年级模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                         @ApiParam(value = "1待设置 2已设置", required = false) @RequestParam(required = false) Integer state,
                                                         @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                         @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        return ResponseObject.ofSuccess(cssTaskInfoService.getMajorList(taskId, studyNature, collegeId, majorId, gradeId, keyWord, state, currentPage, pageSize));
    }

    @ApiOperation("设置专业选课上限")
    @PostMapping(value = "/cs/limit/updateMajorLimit")
    @LogAnnotation(operationType = "2", operationContent = "设置专业选课上限")
    public ResponseObject<Boolean> updateMajorLimit(@ApiParam(value = "更新专业选课上限实体类", required = true) @RequestBody List<MajorLimitInput> majorLimitInput) {
        return ResponseObject.ofSuccess(cssTaskInfoService.addOrUpdateBatchMajorLimit(majorLimitInput));
    }

    @ApiOperation("统一设置专业选课上限")
    @PostMapping(value = "/cs/limit/unifiedMajorLimit")
    @LogAnnotation(operationType = "2", operationContent = "统一设置专业选课上限")
    public ResponseObject<Boolean> updateMajorLimit(@ApiParam(value = "选课任务", required = true) @RequestBody CssTaskInfo cssTaskInfo) {
        return ResponseObject.ofSuccess(cssTaskInfoService.unifiedMajorLimit(cssTaskInfo));
    }


    @ApiOperation("获取学生选课上限列表")
    @GetMapping("/cs/limit/getStudent")
    public ResponseObject<PageInfo<Student>> getStudentByLimit(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                               @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                               @ApiParam(value = "专业id ", required = false) @RequestParam(required = false) String majorId,
                                                               @ApiParam(value = "年级id ", required = false) @RequestParam(required = false) String gradeId,
                                                               @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                                               @ApiParam(value = "名称、学号模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                               @ApiParam(value = "1待设置 2已设置", required = false) @RequestParam(required = false) Integer state,
                                                               @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                               @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<Student> page = new Page<>(currentPage, pageSize);
        page.setOptimizeCountSql(false);
        return ResponseObject.ofSuccess(studentService.getStudentJoinLimit(taskId, page, collegeId, majorId, gradeId, studyNature, keyWord, state));
    }

    @ApiOperation("设置学生选课上限")
    @PostMapping(value = "/cs/limit/updateStudent")
    @LogAnnotation(operationType = "2", operationContent = "设置学生选课上限")
    public ResponseObject<Student> updateStudentLimit(@ApiParam(value = "更新学生实体类", required = true) @RequestBody StudentLimitInput studentLimitInput) {
        return ResponseObject.ofSuccess(cssTaskInfoService.updatePlanStudent(studentLimitInput));
    }

    @ApiOperation("批量设置教学班学生")
    @PostMapping(value = "/batchSetStudent")
    public ResponseObject<List<TeachingClassStudent>> batchAddStudent(@ApiParam(value = "退选实体类", required = true) @RequestBody BatchSetStudent batchSetStudent) {
        return ResponseObject.ofSuccess(studentService.batchAddStudent(batchSetStudent));
    }

    @ApiOperation("获取在线选课的课程列表")
    @GetMapping("/cs/getClassList")
    public ResponseObject<PageInfo<CoursePlanDto>> getFormalCourseBySelect(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                                           @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                                                           @ApiParam(value = "课程类别id 传null全部", required = false) @RequestParam(required = false) String courseTypeId,
                                                                           @ApiParam(value = "课程性质 0全部 1必修  2选修", required = false) @RequestParam(required = false) Integer courseNature,
                                                                           @ApiParam(value = "专业性质，1:公共课，2:专业课", required = false) @RequestParam(required = false) Integer majorProp,
                                                                           @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                                           @ApiParam(value = "课程名模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                                           @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                                           @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<CoursePlanDto> page = new Page<>(currentPage, pageSize);
        page.setOptimizeCountSql(false);
        return ResponseObject.ofSuccess(cssTaskInfoService.getFormalCourseBySelect(taskId, page, studyNature, courseTypeId, courseNature, majorProp, collegeId, keyWord));
    }

    @ApiOperation("获取退选列表")
    @GetMapping("/cs/getDeselectStudent")
    public ResponseObject<PageInfo<StudentCourseVo>> getDeselectStudent(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                                        @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                                        @ApiParam(value = "专业id ", required = false) @RequestParam(required = false) String majorId,
                                                                        @ApiParam(value = "年级id ", required = false) @RequestParam(required = false) String gradeId,
                                                                        @ApiParam(value = "班级id", required = false) @RequestParam(required = false) String classId,
                                                                        @ApiParam(value = "名称、学号模糊查询", required = false) @RequestParam(required = false) String keyWord,
                                                                        @ApiParam(value = "页码", required = true) @RequestParam Integer currentPage,
                                                                        @ApiParam(value = "页容", required = true) @RequestParam Integer pageSize) {
        Page<StudentCourseVo> page = new Page<>(currentPage, pageSize);
        return ResponseObject.ofSuccess(studentService.getDeselectStudent(taskId, page, collegeId, majorId, gradeId, classId, keyWord));
    }

    @ApiOperation("统计-退选统计")
    @GetMapping(value = "/cs/deselectStatistics")
    public ResponseObject<PublishDeselectStatistic> csStatistics(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId) {
        return ResponseObject.ofSuccess(teachingClassService.getDeselectStatistic(taskId));
    }

    @ApiOperation("导出预选课程")
    @GetMapping(value = "/pre/excel")
    @LogAnnotation(operationType = "14", operationContent = "导出预选课程")
    public ResponseObject<String> preToExcel(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                             @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                             @ApiParam(value = "开课单位名字 ", required = false) @RequestParam(required = false) String collegeName,
                                             @ApiParam(value = "课程类别id 传null全部", required = false) @RequestParam(required = false) String courseTypeId,
                                             @ApiParam(value = "课程类别名字", required = false) @RequestParam(required = false) String courseType,
                                             @ApiParam(value = "课程性质 1必修  2选修", required = false) @RequestParam(required = false) Integer courseNature,
                                             @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                             @ApiParam(value = "专业性质，1:公共课，2:专业课", required = false) @RequestParam(required = false) Integer majorProp) {
        return ResponseObject.ofSuccess(teachingClassService.preSelectToExcel(taskId, collegeId, collegeName, courseTypeId, courseType, courseNature, studyNature, majorProp));
    }

    @ApiOperation("导出在线选课")
    @GetMapping(value = "/cs/excel")
    @LogAnnotation(operationType = "14", operationContent = "导出在线选课")
    public ResponseObject<String> csToExcel(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                            @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                            @ApiParam(value = "开课单位名字 ", required = false) @RequestParam(required = false) String collegeName,
                                            @ApiParam(value = "课程类别id 传null全部", required = false) @RequestParam(required = false) String courseTypeId,
                                            @ApiParam(value = "课程类别名字", required = false) @RequestParam(required = false) String courseType,
                                            @ApiParam(value = "课程性质 1必修  2选修", required = false) @RequestParam(required = false) Integer courseNature,
                                            @ApiParam(value = "修读性质 1主 2辅修", required = false) @RequestParam(required = false) Integer studyNature,
                                            @ApiParam(value = "专业性质，1:公共课，2:专业课", required = false) @RequestParam(required = false) Integer majorProp) {
        return ResponseObject.ofSuccess(teachingClassService.csSelectToExcel(taskId, collegeId, collegeName, courseTypeId, courseType, courseNature, studyNature, majorProp));
    }

    @ApiOperation("导出退选结果")
    @GetMapping(value = "/cs/des/excel")
    @LogAnnotation(operationType = "14", operationContent = "导出退选结果")
    public ResponseObject<String> deselectStudentToExcel(@ApiParam(value = "任务流程id", required = true) @RequestHeader Integer taskId,
                                                         @ApiParam(value = "学院id ", required = false) @RequestParam(required = false) String collegeId,
                                                         @ApiParam(value = "学院名字 ", required = false) @RequestParam(required = false) String collegeName,
                                                         @ApiParam(value = "专业id ", required = false) @RequestParam(required = false) String majorId,
                                                         @ApiParam(value = "专业名 ", required = false) @RequestParam(required = false) String majorName,
                                                         @ApiParam(value = "年级id ", required = false) @RequestParam(required = false) String gradeId,
                                                         @ApiParam(value = "年级名 ", required = false) @RequestParam(required = false) String gradeName,
                                                         @ApiParam(value = "班级id", required = false) @RequestParam(required = false) String classId,
                                                         @ApiParam(value = "班级名", required = false) @RequestParam(required = false) String className) {
        return ResponseObject.ofSuccess(studentService.deselectStudentToExcel(taskId, collegeId, collegeName, majorId, majorName, gradeId, gradeName, classId, className));
    }
}
